<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //原生ajax
        var url = 'https://api.vvhan.com/api/sao' //请求地址
        var http = new XMLHttpRequest();
        http.open('get',url,true);
        http.send();
        //状态改变时 触发
        http.onreadystatechange = function(){
            if(http.readyState == 4 && http.status == 200){
                let data = http.responseText //服务器返回的数据
                console.log(data);
            }
        }
    </script>
</body>
</html>